<?php $cid = $this->cid;?>
<div class="btn-group">
    <a href="<?php echo site_urlc('product/create')?>" class='btn btn-primary'> <i class="fa fa-plus"></i> <?php echo $title; ?> </a>
</div>

<?php include_once 'inc_modules_path.php'; ?>

<div class="boxed">
    <div class="boxed-inner seamless">

<table class="table table-striped table-hover select-list">
    <thead>
        <tr>
            <th class="width-small"><input id='selectbox-all' type="checkbox" > </th>
            <?php if($cid == 13):?><?php else:?>
            <th>图</th>
            <?php endif;?>
            <th>招聘职位</th>
            <th>工作地址</th>
            <th>人数</th>
            <th>工作年限</th>
            <th>更新时间</th>
            <th class="span1">操作</th>
        </tr>
    </thead>
    <tbody class="sort-list">
        <?php foreach ($list as $v):?>
        <tr data-id="<?php echo $v['id'] ?>" data-sort="<?php echo $v['sort_id'] ?>">
            <td><input class="select-it" type="checkbox" value="<?php echo $v['id']; ?>" ></td>
            <?php if($cid == 13):?><?php else:?>
            <td>
                <?php if ($v['thumb']): ?>
                <a class="fancybox-img" href="<?php echo UPLOAD_URL. str_replace('thumbnail/', '', $v['thumb']); ?>" title="<?php echo $v['title'] ?>">
                    <img src="<?php echo UPLOAD_URL.$v['thumb'] ?>" alt="<?php echo $v['title'];?>">
                </a>
                <?php endif ?>
            </td>
            <?php endif;?>
            <td> <?php echo $v['title'] ?></td>
            <td> <?php echo $v['dz'] ?></td>
            <td> <?php echo $v['mans'] ?></td>
            <td> <?php echo $v['years'] ?></td>
            <td> <?php echo  date("Y/m/d H:i:s",$v['timeline']); ?> </td>
            <td>
                <div class="btn-group">
                		<?php if($cid == 13):?><?php else:?>
                    <?php include 'inc_ui_flag.php'; ?>
                    <?php endif;?>
                    <?php include 'inc_ui_audit.php'; ?>
                    <a class='btn btn-small' href=" <?php echo site_urlc( $this->router->class.'/edit/'.$v['id']) ?> " title="<?php echo lang('edit') ?>"> <i class="fa fa-pencil"></i> <?php // echo lang('edit') ?></a>
                    <a class='btn btn-danger btn-small btn-del' data-id="<?php echo $v['id'] ?>" href="#"  title="<?php echo lang('del') ?>"> <i class="fa fa-times"></i> <?php // echo lang('del') ?></a>
                </div>
            </td>
        </tr>
        <?php endforeach;?>
    </tbody>
</table>

    </div>
</div>

<div class="btn-group">
    <a id='select-all' class='btn' href="#"> <i class=""></i> <?php echo lang('select_all') ?> </a>
    <a id='unselect-all' class='btn hide' href="#"> <i class=""></i> <?php echo lang('unselect') ?> </a>
    <a id="btn-del" class='btn btn-danger' href="#"> <i class="fa fa-times"></i> <?php echo lang('del') ?> </a>
    <a id="btn-audit" class='btn' href="#" data-audit='1'><?php echo lang('audit') ?></a>
    <a id="btn-audit" class='btn' href="#"  data-audit='0'>取消审核</a>
</div>

<?php echo $pages; ?>

<script>
require(['adminer/js/ui'],function(ui){
  var product = {
    url_del: "<?php echo site_urlc('product/delete'); ?>"
    ,url_audit: "<?php echo site_urlc('product/audit'); ?>"
    ,url_flag: "<?php echo site_urlc('product/flag'); ?>"
    ,url_sortid: "<?php echo site_urlc('product/sortid'); ?>"
  };

  ui.fancybox_img();
  ui.btn_delete(product.url_del);     // 删除
  ui.btn_audit(product.url_audit);    // 审核
  ui.btn_flag(product.url_flag);      // 推荐
  ui.sortable(product.url_sortid);    // 排序
});
</script>
